<html>
<head><title>SQL Scoreboard</title><style type="text/css">
<!--
.style1 {
	font-family: Geneva, Arial, Helvetica, sans-serif;
	font-weight: bold;
	color: #3333CC;
}

-->
</style>

<body>
<div align="center" class="style1">
  <p>ERICSSON TELEVISION FANTASY FOOTBALL LEAGUE: 2009-2010 SEASON</p>
  <p align="center">Team Viewer (USER)</p>
</div>
<BR><BR>
<img src="DB_Graph.php"  border=0 align=center width =300 height=200>

<?php 
cDatabase = new database();

$connect = $cDatabase->connectToDatabase();
$activeDatabase = $cDatabase->getActiveDatabase($connect);
	
$db = $cDatabase->selectDatabase($connect, $activeDatabase);

$selectArray[0] = '*';
$result = $cDatabase->selectFromDatabase($connect, 'playerlist', $selectArray, 'playerCode', $playerCode, NULL, NULL);

$maxWeeks = $cDatabase->GetMaxWeeks($connect);

$weekScore = array();
$row = mysqli_fetch_array($result, MYSQLI_ASSOC);

for ($week = 1; $week <= $maxWeeks; $week++)
{
	if ($week < 10)
		$weekString = "week0".$week;
	else
		$weekString = "week".$week;
	$weekScore[$week] = $row['$weekString'];
	echo"code ".$playerCode." ".$weekScore[$week];
}

?> 



<div align="center">
<form action="<?php echo $_SERVER['PHP_SELF'] ?>?form=yes" method="POST">
  <table border='0'>
    <tr>
	<td><INPUT TYPE="BUTTON" VALUE="Main Menu" ONCLICK="window.location.href='http://ttvuk03703'">
	<INPUT TYPE="BUTTON" VALUE="Previous" ONCLICK="history.back()"></td>
 	</tr>
  </table>
</form>
</div>

</body></html>